package com.dr.springboot.starter.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import springfox.documentation.annotations.ApiIgnore;

@Controller
@RequestMapping("/ftl")
public class FreemarkerController {

    @GetMapping("/index")
//    todo swagger 将不会显示在swagger上
    @ApiIgnore
    public ModelAndView index(ModelMap map){
        map.addAttribute("name","dr");
        return new ModelAndView("freemarker/index",map);
    }
}
